<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreatePositionPaperTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('position_paper', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('position_id',false)->default(0)->index()->comment('点位id');
            $table->string('question')->comment('题目');
            $table->unsignedTinyInteger('input_type')->default(1)->comment('题目类型');
            $table->string('options')->nullable()->comment('题目答案选项值');
            $table->string('standard')->nullable()->comment('题目考察标准');
            $table->timestamps();
            $table->softDeletes();
            $table->engine="InnoDb";
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('position_paper');
    }
}
